#include <iostream>

using std::cout;
using std::endl;

void test()
{
    int a = 10;

    int &ref1 = a;
    int &ref2 = 10;
    const int &ref3 = a;
    const int &ref10 = 10;

    int &&ref3 =  a;//error
    int &&ref4 =  10; //ok
    &ref4;//右值引用ref在此处是左值，但是可以绑定到右值

}

int &&func()
{
    return 10;
}

int main(int argc, char *argv[])
{
    test();
    &func();
    return 0;
}

